package cn.edu.zjicm.wordsnet_d.activity;

import com.umeng.analytics.MobclickAgent;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
import cn.edu.zjicm.wordsnet_d.R;
import cn.edu.zjicm.wordsnet_d.activity.base.WordBaseActivity;

public class AgreementActivity extends WordBaseActivity {

	public static void startActivity(Context mContext, int type) {
		Intent in = new Intent(mContext, AgreementActivity.class);
		in.putExtra("type", TYPE_RECHARGE);
		mContext.startActivity(in);
	}

	final static int TYPE_RECHARGE = 0;
	private TextView agreementTitle, agreementContent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setTitleBarStyle(TITLE_BAR_STYLE_BACK_BUTTON);
		setContentView(R.layout.activity_agreement);

		agreementTitle = (TextView) findViewById(R.id.agreement_title);
		agreementContent = (TextView) findViewById(R.id.agreement_content);

		if (getIntent().getIntExtra("type", 0) == TYPE_RECHARGE) {
			setTitleText("知米充值及增值服务协议");
			agreementTitle.setText(getResources().getString(R.string.recharge_agreement_title));
			agreementContent.setText(getResources().getString(R.string.recharge_agreement_content));
		}
	}

	@Override
	protected void onResume() {
		super.onResume();
		MobclickAgent.onResume(this);
	}

	@Override
	protected void onPause() {
		super.onPause();
		MobclickAgent.onPause(this);
	}
}
